<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="./2.0-Promise.js"></script>
    <script>
        let p = new Promise((resolve, reject) => {
            resolve('ok')
            // reject('err')
            console.log(111);
            // setTimeout(() => {
            //     resolve('ok')
            //     // reject('err')
            //     console.log(111);
            // }, 1000)
        })
        let result = p.then(velue => {
            console.log(velue);
        })
        .then(velue => {
            console.log(velue);
            return new Promise(()=>{})
        })
        .then(velue => {
            console.log(velue);
        })
        .then(velue => {
            console.log(velue);
        }, reason => {
            console.log(reason);
        })
        console.log(p)
        // console.log(result);
    </script>
</body>

</html>